package wechat.base.snd.util

import java.io.IOException
import java.io.InputStream
import java.util.Properties
import org.eclipse.xtend.lib.Property

class ConfPropertiesManager {
	public static ConfProperty confIns = new ConfProperty("/conf.properties");
}

class ConfProperty{
	@Property Properties prop
	@Property String urlPath
	new(String fileName){
		this.prop = new Properties();
		var InputStream input = null;
		
		try {
	     input = getClass().getResourceAsStream(fileName);
		// load a properties file
		this.prop.load(input);
		this.urlPath = this.prop.getProperty("urlpath");
	} catch (IOException ex) {
		ex.printStackTrace();
	} finally {
		if (input != null) {
			try {
				input.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
	}
}